package svgedit.gui.actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import svgedit.gui.Frame;
import svgedit.gui.command.GroupCommand;

/** Combines selected elements into a group.
 */
@SuppressWarnings("serial")
public class GroupAction extends AbstractAction {

    private Frame frame;

    /** Create this action for the given frame */
    public GroupAction(Frame frame) {
        super("Group");
        this.frame = frame;
    }

    public void actionPerformed(ActionEvent ae) {
        
        GroupCommand groupCommand = new GroupCommand(frame);
        frame.getView().getCommandStack().addCommand(groupCommand);
    }


}
